/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: NvmJob.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: Nvm
*
*******************************************************************************/

/** HEADER FILES **/
#include "NvmJob.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
const NvM_JobFct NvM_JobFctTable[NVM_JOB_ID_MAX];


/** GLOBAL DATA DECLARATION **/


/** LOCAL FUNCTION DECLARATION **/


/** GLOBAL FUNCTION DECLARATION **/


/** LOCAL DATA **/
const NvM_JobFct NvM_JobFctTable[NVM_JOB_ID_MAX] = 
{
    NvMJob_ReadBlock,
    NvMJob_WriteBlock,
};


/** GLOBAL DATA **/


/** LOCAL FUNCTION **/


/** GLOBAL FUNCTION **/
/*******************************************************************************
* -Name            NvM_ReadBlock
* -Brief           Service to copy the data of the NV block to its corresponding RAM block 
* -Details         None
* -Param[in]       BlockId: The block identifier uniquely identifies one NVRAM block descriptor
* -Param[out]      NvM_DstPtr: Pointer to the RAM data block
* -Return          None          
*******************************************************************************/
void NvMJob_ReadBlock(
    void
)
{
    MemIf_Read(NvMBlockDescriptorTable[CurrentQueue->BlockId].NvMNvramDeviceId,
                NvMBlockDescriptorTable[CurrentQueue->BlockId].NvMNvBlockNum,
                0, 
                (uint8*)(CurrentQueue->RamAddress), 
                NvMBlockDescriptorTable[CurrentQueue->BlockId].NvMNvBlockLength);
}


/*******************************************************************************
* -Name            NvM_WriteBlock
* -Brief           Service to copy the data of the RAM block to its corresponding NV block 
* -Details         None
* -Param[in]       BlockId: The block identifier uniquely identifies one NVRAM block descriptor
* -Param[in]       NvM_DstPtr: Pointer to the RAM data block
* -Return          None          
*******************************************************************************/
void NvMJob_WriteBlock(
    void
)
{
    
}

